package com.main.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.main.bo.LoginBO;
import com.main.pojo.User;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * 用户服务接口
 *
 * @author RuoYu
 * @date 2022/09/26
 */
public interface UserService extends IService<User> {


    /**
     * 账户登录
     *
     * @param password 密码
     * @param request  请求
     * @param user     用户
     * @return {@link LoginBO}
     */
    LoginBO accountLogin(User user, String password, HttpServletRequest request);


    /**
     * 电子邮件快速登录
     *
     * @param mail        邮件
     * @param mailCaptcha 邮件验证码
     * @param request     请求
     * @return {@link String}
     */
    LoginBO EmailQuickLogin(String mail, String mailCaptcha, HttpServletRequest request);


    /**
     * 手机快速登录
     *
     * @param phoneCode    电话号码
     * @param phoneCaptcha 手机验证码
     * @param request      请求
     * @return {@link String}
     */
    LoginBO PhoneQuickLogin(String phoneCode, String phoneCaptcha,HttpServletRequest request);

    boolean updateUserPassword(User user);
}
